package com.sayimo.maker.user.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sayimo.framework.database.mybatis.AbstractMybatisBaseDao;
import com.sayimo.framework.exception.DaoException;
import com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao;
import com.sayimo.maker.user.vo.ReceivingAddress;


/**
 * @Copyright (c) 2016 广东省尚一互联网有限公司
 * @Project: maker-user
 * @ClassName: ReceivingAddressInterfaceImplDao.java
 * @Description: 会员收货地址
 * @Author:	tanxin
 * @Date:2017年2月8日,上午11:25:05
 * @Version 1.0.0
 */
@Repository(value="receivingAddressInterfaceImplDao")
public class ReceivingAddressInterfaceImplDao extends AbstractMybatisBaseDao<ReceivingAddress> implements ReceivingAddressInterfaceDao{
	
	public ReceivingAddress queryCustomerAddress(Integer customerId)throws DaoException{
		return this.mybatisInterfaceBaseDao.get("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.queryCustomerAddress",customerId);
	}
	
	public List<ReceivingAddress> queryAddressByCond(ReceivingAddress address) throws DaoException {
		return this.mybatisInterfaceBaseDao.query("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.queryAddressByCond", address);
	}

	public int deleteByPrimaryKey(Integer id) throws DaoException {
		return this.mybatisInterfaceBaseDao.delete("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.deleteByPrimaryKey", id);
	}

	public Integer insertSelective(ReceivingAddress address) throws DaoException {
		return this.mybatisInterfaceBaseDao.insert("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.insertSelective", address);
	}

	public int updateByPrimaryKeySelective(ReceivingAddress address) throws DaoException {
		return this.mybatisInterfaceBaseDao.update("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.updateByPrimaryKeySelective", address);
	}

	public ReceivingAddress selectDefaultAddress(ReceivingAddress address) throws DaoException {
		return this.mybatisInterfaceBaseDao.get("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.selectDefaultAddress", address);
	}

	public int batchUpdateRecevingAddress(List<Integer> list) throws DaoException {
		return this.mybatisInterfaceBaseDao.update("com.sayimo.maker.user.dao.ReceivingAddressInterfaceDao.batchUpdateRecevingAddress", list);
	}

}
